package com.Cylinder;

import com.Circle.Circle;

/**
 * ClassName: Cylinder
 * Package:
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2024/9/4 14:56
 * @Version 17.0.2
 */
public class Cylinder extends Circle {
    //圆柱体积 = 底面积 * 高 (V=S底面积 * h = (pai * r * r) h) = pai * r de 平方
    //length 长度
    private double length;

    public Cylinder() {
        length = 1.0;
    }
    public Cylinder(double length) {
        this.length = length;
    }
    public double getLength() {
        return length;
    }
    public void setLength(double length) {
        this.length = length;
    }
    public double getVolume() {;
        double radius = 1.0;
        return Math.PI *  radius *  radius;
    }

}
